<template>
  <div class="sigin">
    <p>{{count}}</p>
    <button @click="siginFtn">签到</button>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
import { getLogs,sigin } from "../../api/secendPage/index";
export default {
  setup() {
    const count = ref(0);
    getLogs({token:localStorage.getItem('token')}).then(res => {
        count.value = res.data.result[0].scoreLeft
    })
    const siginFtn = () => {
      sigin({token:localStorage.getItem('token')}).then(res => {
          console.log(res);
      })
    }
    return{
       count,
       siginFtn
    }
  },
};
</script>
<style lang="scss" scoped>
.sigin{
  height: 100%;
}
</style>